package net.oschina.app.viewpagerfragment.CollectionFragments;

import android.support.v7.widget.LinearLayoutManager;
import android.view.View;

import com.jcodecraeer.xrecyclerview.XRecyclerView;

import net.oschina.app.MApp;
import net.oschina.app.R;
import net.oschina.app.ui.adapter.CollectionAdapter;
import net.oschina.app.util.UIUtils;
import net.oschina.app.viewpagerfragment.MyFragment.BaseItemFragment;

/**
 * Created by Administrator on 2017/4/5.
 */

public class MyBlogFragment extends BaseItemFragment{

    private XRecyclerView mXRecyclerView;

    @Override
    public void showItemFragmentView() {
        View view = View.inflate(UIUtils.getContext(), R.layout.item_fragment,null);
        mXRecyclerView = (XRecyclerView) view.findViewById(R.id.base_detail_xrv);
        LinearLayoutManager manager = new LinearLayoutManager(MApp.mContext);
        mXRecyclerView.setLayoutManager(manager);
        changeView(view);
    }

    @Override
    public void loadDates() {
        CollectionAdapter adapter = new CollectionAdapter(UIUtils.getContext());
        mXRecyclerView.setAdapter(adapter);
    }
}
